<template>
  <div>
    <!-- 折线图 -->
    <div class="line" ref="echar"></div>
  </div>
</template>

<script>
import * as echarts from "echarts";
export default {
  mounted() {
    // 初始化echarts
    let myCharts = echarts.init(this.$refs.echar);
    // console.log(myCharts);
    myCharts.setOption({
      xAxis: { type: "category", show: false },
      yAxis: { show: false },
      // 设置配置项
      series: [
        {
          type: "bar",
          data: [10, 60, 1, 62, 34, 55],
        },
      ],
      //   设置成宽高全部
      grid: {
        top: 0,
        left: 0,
        right: 0,
        bottom: 0,
      },
    });
  },
};
</script>

<style lang="scss" scoped>
.line {
  width: 100%;
  height: 100%;
  height: 80px;
}
</style>
